<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link href="/webjars/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet">
    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="/js/jquery.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="/webjars/bootstrap/4.1.3/js/bootstrap.min.js"></script>

    <link rel="stylesheet" href="/css/bootstrap-table.min.css">
<%--    <script src="/js/bootstrap-table-zh-CN.min.js"></script>--%>
<%--    <script src="/js/bootstrap-table.min.js"></script>--%>

    <script src="/jsps/js/index.js"></script>
</head>
<body>
<div class="container">
    <table class="table">
        <thead>
        <tr>
            <td>id</td>
            <td>name</td>
            <td>CountryCode</td>
            <td>District</td>
            <td>pupulation</td>
            <td>operate</td>
        </tr>
        </thead>
        <tbody>

        <core:forEach items="${requestScope.users.list}" var="item">
            <tr>
                <td>${item.id}</td>
                <td>
                    <input id="name${item.id}" class="input-group-text" type="text" value="${item.name}">
                </td>
                <td>
                    <input id="countryCode${item.id}" class="input-group-text" type="text" value="${item.countryCode}">
                </td>
                <td>
                    <input id="district${item.id}" class="input-group-text" type="text" value="${item.district}">
                </td>
                <td>
                    <input id="population${item.id}" class="input-group-text" type="text" value="${item.population}">
                </td>
                <td>
                    <div style="width: 200px;">
                        <button type="button" class="btn btn-success">新增</button>
                        <button type="button" class="btn btn-primary" onclick="updateOne(${item.id})">修改</button>
                        <button type="button" class="btn btn-danger delBtn" onclick="del(${item.id})">删除</button>
                    </div>
                </td>
            </tr>
        </core:forEach>

        </tbody>
    </table>


</div>
</body>
</html>